<?

$token ='0ead12d9e2efbdde48778eedff5641a9';
$appid = 'wx7e5dd966e49bd207';
$hash = 'test1';
$url = 'http://wx.12301.cc/handler_raw.php';
$salt = substr($token,0,16);
$param = base64_encode($salt.$appid.$hash);
$data0 = array(
    'do' => 'CreateDefaultMenu',
    'hash' => $hash,
    'param'=>$param
   );
$data1 = json_encode($data0);
// print_r($data1);
$z = raw_post($url,$data1);
print_r($z);

function raw_post($url,$data){
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_URL,$url);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
        return curl_exec($ch);
    }